package Sort;

import java.util.Random;

/**
 * @Author Fizz Pu
 * @Date 2021/4/1 下午3:05
 * @Version 1.0
 * 失之毫厘，缪之千里！
 */
public class TestSort {

    static void testSort(SortAlgrithom quickSort){
        int[] arr1 = {1, 2, 5, 3};
        int[] arr2 =  {1,2,3};
        int[] arr3 = {1, 1, 1};
        int[] arr4 = {5, 4 ,3, -5};
        int[] arr5 = {1};
        int[] arr6 = {};
        int[] arr7 = new int[1000];
        for(int i = 0; i < 1000; i++){
            arr7[i] = i;
        }

        Random random = new Random();
        int[] arr8 = new int[1000];
        for(int i = 0; i < 1000; i++){
            arr8[i] = random.nextInt(1000);
        }

        quickSort.sort(arr1);
        quickSort.sort(arr2);
        quickSort.sort(arr3);
        quickSort.sort(arr4);
        quickSort.sort(arr5);
        quickSort.sort(arr6);
        quickSort.sort(arr7);
        quickSort.sort(arr8);
    }

    public static void main(String[] args) {
        // testSort(new BubbleSort());
        // testSort(new SelectSort());
        // testSort(new InsertSort());
        // testSort(new QuickSort());
        testSort(new MergeSort());
    }
}
